package cn.fengshenghospital.service.impl;

import cn.fengshenghospital.entity.CmsMenu;
import cn.fengshenghospital.mapper.CmsMenuMapper;
import cn.fengshenghospital.service.CmsMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImplCmsMenuService implements CmsMenuService {
    @Autowired
    private CmsMenuMapper cmsMenuMapper;

    @Cacheable(value = "cmsMenu",keyGenerator = "myKeyGenerator",unless = "#result == null")
    @Override
    public List<CmsMenu> queryCmsMenu() throws Exception {
        return cmsMenuMapper.getCmsMenu();
    }
}
